Make css parser tests run
authorMatthias Clasen <mclasen@redhat.com>
Thu, 12 Oct 2017 07:58:05 +0000 (15:58 +0800)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 12 Oct 2017 07:58:05 +0000 (15:58 +0800)
We need to set G_TEST_SRCDIR and friends for this to do anything.
Setting it reveals that a bunch of the tests are broken.

testsuite/css/parser/meson.build

index 3ea4bf013a3dbe8fdd1f8dd5adbed92667aa545b..7bb8df9c23ed07f5372db46bdf28559f39bbbaf3 100644 (file)
@@ -1,10 +1,16 @@
+test_env = environment()
+test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
+test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
+test_env.set('GSETTINGS_BACKEND', 'memory')
+test_env.set('G_ENABLE_DIAGNOSTIC', '0')
+
 testexecdir = join_paths(installed_test_bindir, 'css', 'parser')
 
 test_parser = executable('test-css-parser', 'test-css-parser.c',
-                        install: get_option('install-tests'),
-                        install_dir: testexecdir,
+                         install: get_option('install-tests'),
+                         install_dir: testexecdir,
                          dependencies: libgtk_dep)
-test('css-parser', test_parser, suite: 'css')
+test('css-parser', test_parser, suite: 'css', env: test_env)
 
 test_data = [
   'animation-crash-3.12.css',